package eu.ahsx.limboa.media
{
	import flash.events.Event;
	
	/**
	 * 	@author Masy Alexandre
	 * */
	internal final class MediaEvent extends Event
	{
		/**			
		 * 	Initialize the loading of a file
		 * */
		public static const INIT:String = "init";
		
		/**
		 * 	Start the loading
		 * */
		public static const START:String = "start";
		
		/**
		 * 	Progressing the loading
		 * */
		public static const PROGRESS:String = "progress";
		
		/**
		 * 	The load have been accomplished
		 * */
		public static const COMPLETE:String = "complete";
		
		/**
		 * 	The requested data are ready for picking up
		 * */
		public static const DONE:String = "done";
		
		/**
		 * 	A file has encountered an error while loading
		 * */
		public static const ERROR:String = "error";

		/**
		 * 	The file in relation with this event	
		 * */
		public var file:MediaFile;
		
		/**
		 * 	Percentage of file loading
		 * */
		public var percent:Number;
		
		public function MediaEvent(file:MediaFile, percent:int, type:String, bubbles:Boolean=true, cancelable:Boolean=false)
		{
			this.file = file;
			this.percent = percent;
			
			super(type, bubbles, cancelable);
		}
	}
}